package com.shundr.shipper.common.view;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.widget.TextView;

import com.shundr.shipper.R;

/**
 * 
 * DialogWalletLow
 * 
 * @author larry 2015-7-1 下午5:13:24 
 * @version 1.0.0
 *
 */
public class DialogWalletLow extends Dialog {

	private Context mContext;
	private int money;
	private boolean isShow;

	public DialogWalletLow(Context context, int money, boolean isShow) {
		super(context, R.style.dialog_style);
		this.mContext = context;
		this.money = money;
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		setContentView(R.layout.view_wallet_low);
		TextView tvTips = (TextView) findViewById(R.id.tv_tip);
		TextView tvMoney = (TextView) findViewById(R.id.tv_money);
		tvTips.setText("恭喜您领取" + money + "个积分");
		tvMoney.setText(money + "");
		findViewById(R.id.btn_ikow).setOnClickListener(
				new View.OnClickListener() {
					@Override
					public void onClick(View v) {
						dismiss();
					}
				});
		
		if(isShow){
			new Handler().postDelayed(new Runnable() {
				
				@Override
				public void run() {
				}
			}, 3000);
		}
		this.setCanceledOnTouchOutside(false);
		super.onCreate(savedInstanceState);
	}

}
